import org.softmed.rest.generation.xml.PagedList;
import org.restlet.resource.*;
import org.restlet.data.*;

itemCount = -1;
pageParam = queryParameters.getFirst(
		"size");

if (pageParam != null) {
	String pageText = pageParam.getValue();
	if (pageText != null){
		itemCount = Integer.valueOf(pageText);
		if(itemCount <= 0 || itemCount > PagedList.maxItemsPerPage){
			throw new SimpleException("requested paged list size must be between 1 and "  + PagedList.maxItemsPerPage);
		}
			
	}
}

